import numpy
import pylab
import sys
from math import sin

main_time = 0
sample_time = 0.01
pi = 3.1415
x = []
w = 2*pi
while (main_time < 100):
    k = sin(w*main_time)	
    x.append(k)
    main_time += sample_time

length = len(x)
t = range(length)

pylab.plot(t, x)
pylab.xlabel('time (s)')
pylab.ylabel('result (x)')
pylab.title('sine wave')
pylab.grid(True)
pylab.savefig('simple_plot')
pylab.show()

